﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Web;

namespace sb.core.Framework {
    public class SiteContext {
        public static ISiteContext Current {
            [DebuggerStepThrough]
            get {
                var key = "SITE_CONTEXT";
                ISiteContext context = HttpContext.Current.Items[key] as ISiteContext;
                if (context == null) {
                    context = new SiteContextInstance(HttpContext.Current);
                    HttpContext.Current.Items[key] = context;
                }
                return context;
            }
        }
    }
}
